package com.henghe.frame.common.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2023/4/12 13:26
 */
@Data
@ApiModel("分页返回对象")
public class JsonPageResult<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonProperty("total_record")
    @ApiModelProperty("总记录数")
    private long totalRecord;

    @JsonProperty("total_page")
    @ApiModelProperty("总页数")
    private Integer totalPage;

    /**
     * 列表数据
     */
    @ApiModelProperty("列表数据")
    private List<T> records;

    /**
     * 当前页条数
     */
    @ApiModelProperty("当前页条数")
    @JsonProperty("curren_records")
    private Integer currentRecords;

    @ApiModelProperty("冗余数据")
    private Object exData;
}
